package com.person.news.action;

import java.util.List;

import com.person.commons.struts2.BaseAction;
import com.person.commons.utils.FlipPageInfo;
import com.person.news.model.NewsRevert;
import com.person.news.service.NewsRevertService;

public class NewsRevertAction extends BaseAction {
	
	private List<Object[]> newsRevert;
	private FlipPageInfo fpi = new FlipPageInfo();
	private NewsRevertService newsRevertService;
	
	private String newsRevertId;
	private NewsRevert Revert;
	
	public String index(){
		fpi = newsRevertService.findAllNewsRevert(fpi);
		return "list";
	}
	
	public String delete(){
		newsRevertService.deleteNewsRevertById(newsRevertId);
		return index();
	}
	
	public String detail(){
		Revert = newsRevertService.findNewsById(newsRevertId);
		return "detail";
	}

	public List<Object[]> getNewsRevert() {
		return newsRevert;
	}

	public void setNewsRevert(List<Object[]> newsRevert) {
		this.newsRevert = newsRevert;
	}

	public void setNewsRevertService(NewsRevertService newsRevertService) {
		this.newsRevertService = newsRevertService;
	}

	public FlipPageInfo getFpi() {
		return fpi;
	}

	public void setFpi(FlipPageInfo fpi) {
		this.fpi = fpi;
	}

	public String getNewsRevertId() {
		return newsRevertId;
	}

	public void setNewsRevertId(String newsRevertId) {
		this.newsRevertId = newsRevertId;
	}

	public NewsRevert getRevert() {
		return Revert;
	}

	public void setRevert(NewsRevert revert) {
		Revert = revert;
	}
	
	

}
